wayland: Don't set cursor surface scale when we don't have a surface
authorJonas Ådahl <jadahl@gmail.com>
Fri, 13 Mar 2015 07:26:51 +0000 (15:26 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 16 Mar 2015 11:53:37 +0000 (19:53 +0800)
commitc7be8fd398ad88188928129f87122d142850b160
treef9ba27ad379893ec55f6b5dbb16b2da5ab5dcb73
parent6675b9639cc790b8a15343322bda526646bd5cfc
wayland: Don't set cursor surface scale when we don't have a surface

The setting of the the surface scale even when the surface is not
created from a surface was introduced due to a crash when getting the
buffers when dividing by the scale. The only reason I can see this is
that we get the buffer from a non-existing surface when the wl_cursor
has not yet been set.

Instead, use the name field to avoid trying to use the non-existing
surface, effectively avoiding the division-by-zero that way.

https://bugzilla.gnome.org/show_bug.cgi?id=746141
gdk/wayland/gdkcursor-wayland.c